package com.treasure.mall.biz.entity.live;

import com.treasure.mall.biz.entity.Base2PO;
import com.treasure.mall.biz.entity.user.UserPO;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

/**
 *
 * 直播间关注粉丝
 * <p>
 * 有可能取消关注
 * +---------------------------------------------------------
 * * @package: com.treasure.mall.biz.entity.live
 * * @author: guomw (guomwchen@foxmail.com)
 * * @date: 2020/6/11 20:09
 * * @since: V1.0.0
 * +---------------------------------------------------------
 * 注意：本内容仅限于内部传阅，禁止外泄以及用于其他的商业目的
 * Copyright 2019-2022 com.treasure.mall.biz.entity.live Inc. All rights reserved.
 */
@Entity
@Setter
@Getter
@Table(name = "zb_live_room_fan")
public class LiveRoomFanPO extends Base2PO {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;


    @ManyToOne
    @JoinColumn(name = "room_id", foreignKey = @ForeignKey(value = ConstraintMode.NO_CONSTRAINT))
    private LiveRoomPO room;

    /**
     * 用户
     */
    @ManyToOne
    @JoinColumn(name = "user_id", foreignKey = @ForeignKey(value = ConstraintMode.NO_CONSTRAINT))
    private UserPO user;
}
